﻿@using System.Data.Entity.Core.Objects
@using DemoUserInfo.Models
@using Microsoft.AspNet.Identity
@using Microsoft.AspNet.Identity.EntityFramework
@model DemoUserInfo.Models.IndexViewModel
@{
    ViewBag.Title = "个人设置";
}
@{
    var currentUserId = User.Identity.GetUserId();
    var manager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext()));
    var currentUser = manager.FindById(currentUserId);
}
<div class="fixedSlider">
    <h2 class="text-center">  @ViewBag.Title</h2>
    <hr />
    <div class="text-center">
        <img src=@currentUser.AvatarParth class="img-circle" width="60" height="60">
    </div>
    <div class="text-center">
        @currentUser.NickName
        <hr />
    </div>
    <ul class="nav nav-pills nav-stacked text-center">
        <li role="presentation" class="active">
            <a href="#Account" aria-controls="Account" role="tab" data-toggle="tab">用户信息</a>
        </li>
        <li role="presentation">
            <a href="#Password" aria-controls="Password" role="tab" data-toggle="tab">账号管理</a>
        </li>
        <li><hr /></li>
        <li role="presentation">
            <a href="#Article" aria-controls="Article" role="tab" data-toggle="tab">我的文章</a>
        </li>
        <li role="presentation">
            <a href="#Collection" aria-controls="Collection" role="tab" data-toggle="tab">我的收藏</a>
        </li>
        <li role="presentation">
            <a href="#Message" aria-controls="Message" role="tab" data-toggle="tab">我的私信</a>
        </li>
        <li><hr /></li>
        <li role="presentation">
            <a href="#SysMessage" aria-controls="SysMessage" role="tab" data-toggle="tab">系统提醒</a>
        </li>
    </ul>
</div>

<div class="container">
    <div class="row">
        <div class="col-md-8">
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane active" id="Account">
                    @Html.Partial("_PartialPage1")
                </div>
                <div role="tabpanel" class="tab-pane" id="Password">
                    @Html.Partial("_PartialPage2")
                </div>
                <div role="tabpanel" class="tab-pane" id="Article">
                    @Html.Partial("_PartialPage3")
                </div>
                <div role="tabpanel" class="tab-pane" id="Collection">
                    @Html.Partial("_PartialPage4")
                </div>
                <div role="tabpanel" class="tab-pane" id="Message">
                    @Html.Partial("_PartialPage5")
                </div>
                <div role="tabpanel" class="tab-pane" id="SysMessage">
                    @Html.Partial("_PartialPage6")
                </div>
            </div>
        </div>
    </div>
</div>